import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.Objects;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-06-12
 * Time: 8:09
 */
class ArrayUtil extends Exception{
    public int findMax (int[] arr, int begin, int end) {
        int max = 0;
        if(end > arr.length) {
            throw new IllegalArgumentException("java.lang.IllegalArgumentException: end:" + end + " > arr.length");
        } else if (begin < 0) {
            throw new IllegalArgumentException("java.lang.IllegalArgumentException: begin:" + begin + " < 0");
        } else {
            if(begin >= end) {
                throw new IllegalArgumentException("java.lang.IllegalArgumentException: begin:" + begin + " >= " + "end:" + end);
            } else {
                max = arr[begin];
                for (int i = begin + 1; i < end; i++) {
                    if(max < arr[i]) {
                        max = arr[i];
                    }
                }
            }
        }
        return max;
    }
}
class IllegalTriangleException extends Exception {
    public IllegalTriangleException(String message) {
        super(message);
    }
}
class Triangle {
    double side1;
    double side2;
    double side3;
    public Triangle(double side1, double side2, double side3) throws IllegalTriangleException {
        //实现
        if (side1 + side2 <= side3 || side2 + side3 <= side1 || side1 + side3 <= side2) {
            throw new IllegalTriangleException("Invalid: " + side1 + "," + side2 + "," + side3);
        } else {
            this.side1 = side1;
            this.side2 = side2;
            this.side3 = side3;
        }
    }

    @Override
    public String toString() {
        return "Triangle [" +
                "side1=" + side1 +
                ", side2=" + side2 +
                ", side3=" + side3 +
                ']';
    }
}
class IllegalScoreException extends Exception {
    public IllegalScoreException(String m) {
        super(m);
    }
}
class IllegalNameException extends Exception {
    public IllegalNameException(String m) {
        super(m);
    }
}
class Student {
    private String name;
    private int score;

    @Override
    public String toString() {
        return "Student [" +
                "name=" + name +
                ", score=" + score +
                ']';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) throws IllegalNameException {
        if (Character.isDigit(name.charAt(0))) {
            throw new IllegalNameException("the first char of name must not be digit, name=" + name);
        }
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }
    public int addScore(int score) throws IllegalScoreException {
        int n = this.score + score;
        if(n < 0 || n > 100) {
            throw new IllegalScoreException("score out of range, score=" + score);
        }
        this.score = n;
        return this.score;
    }
}
class Loan {
    public double annualInterestRate = 2.5;
    public int numberOfYears = 1;
    public double loanAmount = 100;
    public Date loanDate;

    public double monthInterestRate = annualInterestRate / 1200.0;
    public Loan() {

    }

    public Loan(double annualInterestRate, int numberOfYears, double loanAmount)throws IllegalArgumentException {
         if (annualInterestRate <= 0) {
            throw new IllegalArgumentException("Annual interest rate must be positive");
        } else if(numberOfYears <= 0) {
            throw new IllegalArgumentException("Number of years must be positive");
        } else if (loanAmount <= 0) {
            throw new IllegalArgumentException("Loan amount must be positive");
        }
        this.annualInterestRate = annualInterestRate;
        this.numberOfYears = numberOfYears;
        this.loanAmount = loanAmount;
        this.monthInterestRate = annualInterestRate / 1200;
    }

    public double getAnnualInterestRate() {
        return annualInterestRate;
    }

    public void setAnnualInterestRate(double annualInterestRate) {
        this.annualInterestRate = annualInterestRate;
    }

    public int getNumberOfYears() {
        return numberOfYears;
    }

    public void setNumberOfYears(int numberOfYears) {
        this.numberOfYears = numberOfYears;
    }

    public double getLoanAmount() {
        return loanAmount;
    }

    public void setLoanAmount(double loanAmount) {
        this.loanAmount = loanAmount;
    }

    public Date getLoanDate() {
        return loanDate;
    }

    public void setLoanDate(Date loanDate) {
        this.loanDate = loanDate;
    }
    public double getMonthlyPayment() {
        return (monthInterestRate * loanAmount) / (1 - (1 / Math.pow(1 + monthInterestRate, 12 * numberOfYears)));
    }
    public double getTotalPayment() {
        return getMonthlyPayment() * 12.0 * numberOfYears;
    }
}

public class Main {
    public static void main10(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        Date[] dates = new Date[n];
        int count = 0;
        for (int i = 0; i < n; i++) {
            String s = scanner.next();
            try {
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
                dates[count] = simpleDateFormat.parse(s);
                count++;
            } catch (ParseException e) {
                System.out.println("Line " + i + " error. Unparseable date: \"" + s + "\"");
            }
        }
        System.out.println("Totally " + (n - count) + " lines error.");
        for (int i = 0; i < count; i++) {
            for (int j = 0; j < count - 1 - i; j++) {
                if(dates[j].compareTo(dates[j + 1]) > 0) {
                    Date date = dates[j];
                    dates[j] = dates[j + 1];
                    dates[j + 1] = date;
                }
            }
        }
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM dd, yyyy");
        for (int i = 0; i < count; i++) {
            System.out.println(simpleDateFormat.format(dates[i]));
        }
    }
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        while (input.hasNext()) {
            double AIR = input.nextDouble();
            int NOY = input.nextInt();
            double LA = input.nextDouble();
            try {
                Loan m = new Loan(AIR, NOY, LA);
                System.out.printf("%.3f\n",m.getTotalPayment());
            } catch (Exception ex) {
                System.out.println(ex);
            }
        }

    }
    public static void main9(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.next();
            if(s.equals("other")) {
                break;
            }
            scanner.nextLine();
            Student student = new Student();
            String s1 = scanner.nextLine();
            String[] strings = s1.split(" ");
            if(strings.length < 2) {
                System.out.println("java.util.NoSuchElementException");
            } else {
                try {
                    String name = strings[0];
                    int age = Integer.parseInt(strings[1]);
                    student.setName(name);
                    student.addScore(age);
                    System.out.println(student);
                } catch (Exception e) {
                    System.out.println(e);
                }
            }
        }
        scanner.close();
        System.out.println("scanner closed");
    }
    public static void main7(String[] args) {
        int[] arr = new int[5];
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String str = scanner.next();
            try {
                if(str.equals("other")) {
                    break;
                } else if (str.equals("arr")) {
                    int t = scanner.nextInt();
                    arr[t] = 0;
                } else if (str.equals("null")) {
                    String s = null;
                    System.out.println(s.length());
                } else if (str.equals("cast")) {
                    Object st = "a";
                    int i = (Integer)st;
                } else if (str.equals("num")) {
                    String s = scanner.next();
                    int t = Integer.parseInt(s);
                }
            } catch (Exception e) {
                System.out.println(e);
            }
        }
    }
    public static void mod(int n) {
        System.out.println("余数结果是" + 100 % n);
    }
    public static void main6(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入5个数：");
        for (int i = 0; i < 5; i++) {
            try {
                mod(sc.nextInt());
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }
        }
        sc.close( );
    }
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int sum = 0;
        String str = scanner.nextLine();
        String[] strings = str.split(" ");
        for (int i = 0; i < strings.length; i++) {
            try {
                int n = Integer.parseInt(strings[i]);
                sum += n;
            } catch (Exception e) {
                ;
            }
        }
        System.out.println(sum);
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        try {
            Triangle triangle = new Triangle(scanner.nextDouble(), scanner.nextDouble(), scanner.nextDouble());
            System.out.println(triangle);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }

    }
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] num = new int[n];
        for (int i = 0; i < n; i++) {
            num[i] = scanner.nextInt();
        }
        int m = scanner.nextInt();
        ArrayUtil arrayUtil = new ArrayUtil();
        for (int i = 0; i < m; i++) {
            int begin = scanner.nextInt();
            int end = scanner.nextInt();
            try {
                int t = arrayUtil.findMax(num, begin, end);
                System.out.println(t);
            } catch (Exception e) {
                System.out.println(e.getMessage());
            }
        }
    }
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] num = new int[n];
        int count = 0;
        while (count < n) {
            try {
                String str = scanner.next();
                int i = Integer.parseInt(str);
                num[count++] = i;
            } catch (Exception e) {
                System.out.println("java.lang.NumberFormatException: " + e.getMessage());
            }
        }
        System.out.println(Arrays.toString(num));
        scanner.close();
    }
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num1 = sc.nextInt();
        int num2 = sc.nextInt();
        /********* Begin *********/
        try {
            System.out.println(num1/num2);
        } catch (Exception e) {
            System.out.println("除数不能为0");
        }




        /********* End *********/
    }
}
